
<?php
include ('template/header2.php');
include("db_config.php"); 
   $link=Conectarse(); 
//session_start();
$nc=$_POST['nc'];
$pass=$_POST['contranew'];
						
	$result=mysql_query("select nc, password from alumno where nc='$nc'",$link);

$query="update alumno set password='$pass' where nc='$nc'";
$query2="update usuario set password='$pass' where nc='$nc'";

$resulta = mysql_query($query,$link);

if($result==1){
?>
<script type="text/javascript"> window.location="index.php"</script>
<?php }else {?>
<script type="text/javascript"> window.location="index.php"
</script>

<?php }?>